The present application is being concurrently filed with commonly assigned U.S. patent application Ser. No. 09/036,567 entitled xe2x80x9cUSING REMEMBERED PROPERTIES TO CREATE AND REGENERATE POINTS ALONG AN EDITABLE PATHxe2x80x9d, the disclosure of which is incorporated herein by reference and commonly assigned U.S. patent application Ser. No. 09/037,721 entitled xe2x80x9cUSE OF FILTERS ATTACHED TO OBJECTS TO MODIFY THE APPEARANCE OF THE OBJECTSxe2x80x9d, the disclosure of which is incorporated herein by reference.
This application relates in general to the manipulation of computer graphic objects, and in specific to editing tools that allow the reshaping of the line paths that comprise the graphic objects, which are independent from the underlying format of the objects.
In the prior art, a path can be created on a computer, such that the path is made up of Bezier control points. A Bezier curve is a mathematical description of a curve, which is characterized as a parametric cubic equation in X and Y. The X and Y locations along the curve are defined by two parametric cubic equations with four coefficients, with the parameters ranging from 0 to 1. This is used in graphical applications to represent curve paths. A Bezier control point is an alternate way of representing a Bezier curve. An individual curve is split up into two end points and two control points. The ends points are actually located on the curve. The control points are located off of the curve and are used to find the initial and final tangents of the curve. This is used in several graphic applications, for example, FreeHand, CorelDraw, Canvas, and Adobe Illustrator.
The prior art allows paths to be drawn comprising Bezier control points and Bezier handles. The control points are used to define specific places along the curve to anchor curves. The handles are used to define how the curve extends between the points and are used to reshape the curve. Thus, the points and handles are used to both reshape the curve and define the curve. There are several ways to reshape the curve. One way would be to select one of the Bezier control points and move that point. Another way would be to select the Bezier control points, which will show its corresponding handles, and move the handles. Note that this does not move the actual anchor point, but it reshapes the curve extending away from the anchor point. Another way to control the overall shape of a path would be to select multiple points and perform some operation on those points. The operation could be selecting multiple points and moving multiple points at once. This sort of stretches the selected part of the path. Another operation might be selecting points on a path and using some sort of filter to automatically add other points between the selected points, for example, a roughen filter that creates new points. Note that this does not change the overall shape of the path, it changes the appearance. So instead of adding a curve between two points, just changes the appearance of the path, for instance, it might add some rough jagged edges. Thus, the user has very little control over the actual shape of the path.
A problem with the prior art mechanisms is that the user has to understand Bezier control points, which is a sophisticated technology. This is problematic because Bezier control points are an abstraction away from the actual shape, so it is difficult to reshape a path without understanding Bezier control points and handles. Consequently, it is difficult to just select on a part of the path and move it to a desired location. Other prior art mechanisms allow for reshaping paths, without respect to points, and involves the selection of different areas of a path and shift dragging or manipulating the selected areas of the path while leaving the remaining points affected. This is still based on the control points and manipulation of control points, and not on the shape of the curve.
Another mechanism reshapes a path by using the control points, such that the area between select specific control points on a path is reshaped or moved. The problem is that this mechanism still only reshapes the existing points, and does not destroy them or create new ones. For example, points A and Z are selected, with points B-Y are reshaped or moved, however, these points still exist, they are never destroyed and new ones are never created. Thus, the overall path shape does not change very much. Consequently, this mechanism allows some general reshaping of the overall shape of the path, but it requires the user to still be very cognizant of the location of the control points. They may not ignore the control points, and must be careful about their placement.
In the prior art it is often hard to reshape the path, because there are many segments of the path in a very close area, i.e. overlapping segments. To reshaping an area of a path, particularly an area comprising overlapping paths, the prior art consists of mechanisms for scaling, skewing, or rotating, such that an entire area can be affected. Specific Bezier control points that has been selected can also be scaled or skewed or moved. The prior art also consists of a mechanism to use an envelope to describe the outer boundaries of an area, such that an entire path could be selected and put into a different perspective, for instance, leaning the path forward in space. A problem with this approach is that only the entire path can be affected at once, as opposed to a piece of the path.
Another problem is that even those techniques that allow multiple parts of a path to be affected still require the selection of specific Bezier control points rather than a specific region of space. For instance, if there are two points on top of each other, with a curve stretching to the right, the two points could be manipulated without having any control over the curve between them. The points can be scaled, but the curve would not be affected, except indirectly. Another problem is that the enveloping technique may allow manipulation of the entire path, but not a part of the path. One example of the envelope technique would be taking a path in the shape of the letter M, which has three descending stems coming down from the M. With enveloping, one could make the M wave like a flag in a breeze, but it would be very difficult to make only one of the three stems of the M wave like a flag in the breeze.
In summary, one problem with the prior art is that users have to understand Bezier control points. Thus, in order to reshape paths, users have to select specific Bezier control points. To reshape the path, the Bezier control points must be in the correct locations to accomplish the desired ends of the user. Thus, new points may have to be created, and others may have to be destroyed, in order to get the desired effect of the user are such operations are difficult to perform. Another problem is it is difficult to reshape a path based on an area in space, particularly overlapping paths. A further problem is that the user has very little control of the reshape of the path, as compared to the size of their precision point, in other words it is difficult to select exactly the desired part of the path for reshaping.
These and other objects, features and technical advantages are achieved by a system and method uses three different mechanism to manipulate paths.
The first mechanism allows a user to xe2x80x98pullxe2x80x99 a segment of a path. A user selects a specific place on the path, and without respect to existing Bezier control points, is able to pull the selected place along with a selected distance on either side of the place on the path, to a desired location.
So instead of the user having to select Bezier control points, the user merely selects any location along the path, and thereby will affect a segment of the path equal to a distance on either side of the selected location. The distance can be selected via several mechanisms. One is to dynamically use modifier keys to increment the distance. Another is to numerically specify an amount of distance on either side of the selected point. Another is via pressure controlled by a pressure sensitive pen. Note the distance can be set before or after selection of the point. The amount of path movement depends upon the distance from the selected location, in accordance with a transfer function, e.g. the inverse square of the distance. Thus, parts of the path that are further from the selected location will be moved less. The effect being that there is a gradual fall off of the path changes. Thus the change appears to be gradual or smooth, as opposed to radical. Note that the function could be a step function or sine function, or other arbitrary function designed by the user. The final results may involve internally either adding or deleting, and reshaping Bezier control points. However is the user is not confronted with the Bezier control points during the reshaping process.
The second mechanism allows a user to xe2x80x98pushxe2x80x99 a segment of a path, by using an arbitrary shape and sculpting the path. The arbitrary shape is used in a manner similar in which a sculptor would use a putty knife and sculpts away part of the path, by pushing that shape into the path. The path is being repelled from the shape, as the shape is being pushed. For example, if the shape is a circle, then hemispherical depressions can be created by pushing the tool part way into the path. Note that the diameter can be changed, and thereby change the amount of the area that is displaced as the shape moves into the path. Just as with pulling mechanism, the pushing mechanism is directed to a particular place along the path, which is irrespective of Bezier control points. Bezier control points may be added or deleted, or the path reshaped depending on what is necessary to match the newly sculpted shape. The tool used to do the pushing does not have to be smooth, nor does not have to be round, it could be any arbitrary shape, e.g. the profile of a face. The size of the pushing tool can be varied dynamically by several mechanisms. For example, it can be varied by a specifically inputted number, it can be varied by pressure, or it could be varied by specific control keys on the keyboard. Each could be used to scale the pushing tool. Note that a difference between the pushing mechanism and the pulling mechanism is that in using the pulling mechanism, the user selects a specific point on the path and pulls that point, whereas with the pushing mechanism, the user applies a tool to different points along the path.
The third mechanism allows a user to reshape an area of the path. The area reshaping tool allows a user to select a specific point in space and modify any parts of the path that lie within that region of space. The defined region could be any arbitrary shape, including circular. The parameters of the region are strength and diameter. The diameter is the overall area that is being affected, and the strength is measure of the amount of the effect. The strength is similar to gravity, in that the effects are related to the distance from the center. Strength determines the area of the path is going to be affected relative to the amount of path movement in accordance with the transfer function. These parameters can be varied dynamically using mechanisms similar to the pushing and pulling tools.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and the specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims.